package com.zmm.zebulon.module.bpm.biz.dal.mysql.definition;

import com.zmm.zebulon.common.pojo.PageResult;
import com.zmm.zebulon.module.bpm.biz.controller.admin.definition.vo.form.BpmFormPageReqVO;
import com.zmm.zebulon.module.bpm.biz.dal.dataobject.definition.BpmFormDO;
import com.zmm.zebulon.starter.mybatis.mybatis.core.mapper.BaseMapperX;
import com.zmm.zebulon.starter.mybatis.mybatis.core.query.QueryWrapperX;
import org.apache.ibatis.annotations.Mapper;

/**
 * description: 动态表单 Mapper
 *
 * @author zebulon
 * package com.zmm.zebulon.module.bpm.biz.dal.mysql.definition
 * name: BpmFormMapper
 * date 2024/1/10 23:06
 */
@Mapper
public interface BpmFormMapper extends BaseMapperX<BpmFormDO> {

    default PageResult<BpmFormDO> selectPage(BpmFormPageReqVO reqVO) {
        return selectPage(reqVO, new QueryWrapperX<BpmFormDO>()
                .likeIfPresent("name", reqVO.getName())
                .orderByDesc("id"));
    }

}
